package com.hnhuas.salary.modules.admin.service.impl;

import cn.hutool.core.convert.Convert;
import com.hnhuas.salary.common.utils.PageUtils;
import com.hnhuas.salary.common.utils.Query;
import com.hnhuas.salary.modules.admin.dao.SalaryNoticeUserDao;
import com.hnhuas.salary.modules.admin.entity.SalaryNoticeUserEntity;
import com.hnhuas.salary.modules.admin.service.SalaryNoticeUserService;
import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;


@Service("salaryNoticeUserService")
public class SalaryNoticeUserServiceImpl extends ServiceImpl<SalaryNoticeUserDao, SalaryNoticeUserEntity> implements SalaryNoticeUserService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        Long id= Convert.toLong(params.get("id"));

        IPage<SalaryNoticeUserEntity> page = this.page(
                new Query<SalaryNoticeUserEntity>().getPage(params),
                new QueryWrapper<SalaryNoticeUserEntity>().eq("notice_id",id)
        );

        return new PageUtils(page);
    }
}
